package cn.minsh.lims.eoms.modules.app.enums;

import lombok.Getter;

@Getter
public enum MessageTypeEnum {
    REMIND_INSPECTION(1,"巡检提醒"),
    ADD_REPAIR_ORDER(2,"新增维修工单"),
    REJECT_REPAIR_ORDER(3,"维修工单被拒绝"),
    CLOSE_REPAIR_ORDER(4,"维修工单请提关闭"),
    REMIND_MAINTENANCE_ORDER(5,"保养工单提醒"),
    REJECT_MAINTENANCE_ORDER(6,"保养工单被拒绝"),
    CLOSE_MAINTENANCE_ORDER(7,"保养工单请提关闭"),
    REMIND_MAINTENANCE_PLAN(8,"保养计划提醒")
    ;


    private Integer code ;
    private String desc ;

    MessageTypeEnum(Integer code,String desc){
        this.code = code ;
        this.desc = desc ;
    }


    public String getDesc(Integer type) {
        for (MessageTypeEnum messageTypeEnum:values()){
            if (messageTypeEnum.getCode().equals(type)){
                return messageTypeEnum.getDesc() ;
            }
        }
        return null;
    }
}
